package com.stox.client.embedded.watchlist;

import java.util.List;

import com.stox.client.api.watchlist.WatchlistClient;
import com.stox.services.watchlist.manager.WatchlistManager;
import com.stox.shared.core.util.DebugUtil;
import com.stox.shared.watchlist.model.Watchlist;

public class EmbeddedWatchlistClient implements WatchlistClient {
	
	public static final EmbeddedWatchlistClient INSTACE = new EmbeddedWatchlistClient();
	
	private EmbeddedWatchlistClient() {
		
	}
	
	@Override
	public List<Watchlist> findAll() {
		DebugUtil.printStack();
		return WatchlistManager.INSTANCE.findAll();
	}

	@Override
	public Long saveOrUpdate(Watchlist watchlist) {
		DebugUtil.printStack();
		Long id = WatchlistManager.INSTANCE.saveOrUpdate(watchlist);
		watchlist.setId(id);
		return id;
	}

	@Override
	public void delete(Long id) {
		DebugUtil.printStack();
		WatchlistManager.INSTANCE.delete(id);
	}

}
